const { contextBridge, ipcRenderer } = require('electron/renderer')

contextBridge.exposeInMainWorld('electronAPI', {
    openDialog:(data)=>{
        ipcRenderer.send('open-dialog',data)
    },
    loadText:(callback)=>{
        ipcRenderer.on('load-text', (_event, value) => callback(value))
    }
})